import http from '/@/utils/request'

/**
 * 新增生产计划单
 */
export const addPlanOrder = (data) => {
    return http.request({
        url: '/production/orders/add',
        method: 'put',
        data
    })
}
/**
 * 修改生产计划单
 */
export const updatePlanOrder = (data) => {
    return http.request({
        url: '/production/orders/update',
        method: 'put',
        data
    })
}
/**
 * 查询生产计划单列表
 */
export const listPlanOrder = (query) => {
    return http.request({
        url: '/production/orders/list',
        method:'get',
        params:query
    })
}

/**
 *查询生产计划单详情列表
 */
export const getPlanOrderDetails = (data) => {
    return http.request({
        url: '/production/orders/list.details',
        method:'post',
        data
    })
}

/**
 * 删除生产计划单
 */
export const delPlanOrder = () => {
    return http.request({
        url: '/production/orders/delete',
        method: 'put'
    })
}

/**
 * 生产计划单派工
 */
export const addDispatch = (data) => {
    return http.request({
        url: '/production/orders/add.dispatch',
        method: 'put',
        data
    })
}
